package com.example.love.service.User.impl;
import com.example.love.mapper.UserMappers;
import com.example.love.service.IUserService;
import com.example.qianwen.mapper.FilesMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class UserService implements IUserService {
    @Resource
    private  UserMappers userMapper;
    @Resource
    private FilesMapper filesMapper;
    @Transactional()
    public Integer insettUser(String name,Integer age){
      Integer integer =  userMapper.insert(name,age);
        Integer p =  filesMapper.insert(name,Integer.toString(age));
        return integer+p;
    }
}
